package yunjiao.javatutorials.designpatterns.builder;


/**
 * 入口
 *
 * @author yangyunjiao
 */
public class App {
    public static void main(String[] args) {
        System.out.println(new PersonBuilder().withFirstName("张").build());
        System.out.println(new PersonBuilder().withFirstName("张").withLastName("三").build());
        System.out.println(new PersonBuilder().withLastName("三").withFirstName("张").build());

        // 编译失败，必须有姓
        //System.out.println(new PersonBuilder().withLastName("三").build());
    }
}
